﻿@model IPagedList<Entities.Auditlog>
@{
    ViewData["Title"] = "Auditlogs";
}

<h2 class="mt-2 mb-3">@ViewData["Title"]</h2>

<pagination bs-current-page="Model!.CurrentPage" />

<div class="table-wrapper">
    <table class="data-table table table-sm table-striped" style="width:auto">
        <thead>
            <tr>
                <th scope="col" class="searchable">ID</th>
                <th scope="col" class="searchable">time</th>
                <th scope="col" class="searchable">user</th>
                <th scope="col" class="searchable">entity</th>
                <th scope="col" class="searchable">comment</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>@item.LogId</td>
                    <td title="@Html.CstTime(item.Time)">@Html.CstTime(item.Time)</td>
                    <td>@item.UserName</td>
                    <td>@item.DataType @item.DataId</td>
                    <td>@item.Action @item.ExtraInfo</td>
                </tr>
            }
        </tbody>
    </table>
</div>
